a=input()
b=raw_input()
cnt = 0
for i in range(0,a-1):
	if b[i] == b[i+1]:
		cnt= cnt+1
print cnt
